//
//  THCurrentVCWindowsManager.m
//  THBaseBus
//
//  Created by xiuxin on 2022/8/26.
//

#import "THCurrentVCWindowsManager.h"

@implementation THCurrentVCWindowsManager

static THCurrentVCWindowsManager *shareManag = nil;

+ (instancetype)shareManager
{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        shareManag = [[THCurrentVCWindowsManager alloc]init];
    });
    
    return shareManag;
}

- (UIWindow*)currentWindow
{
    if([_delegate respondsToSelector:@selector(lastWindow)]){
        return [_delegate lastWindow];
    }
    
    return [UIApplication sharedApplication].keyWindow;
}

@end
